added c code to find fpm