removing console.logs and using compute the right way