move function to its user
remove extra lines