Check profit function
Check profit function