-- fixed type
-- refactor bad coding style
-- fixed randomly occuring null pointer at jump statements