Just try some simple sample with the right function and then go about with the actual problem.