fixed white spacing and added (embarrassing absent) variable declarations