Common functions are moved to utils file