some functions to improve farming