YJ- Changed the instance variables to type 'short' (to save memory)
YJ- Fixed the bug that Michael pointed out