add test and remove unused method