remove unused variable
add ability to store results