moved util method to util module