Fixed a missing semicolon and changed var freq from Byte to Int.