removed spaces in empty lines
forgot to initialize currentRef