remove unused variable and function