remove unused constants
print errors
specify type of variable
argument doesn't need to be mutable