removed unused parameter
updated code and fixed test