* fixed Undefined property bug
* code clean-up