code clean up in function