removed useless var, main function