removed unused variable for function