added closing statement
remove useless function