cleanup of code per review