refactor 'function' -> 'public funtion'
set protected to allow inheritance
sync constructor with develop branch
refactor var -> public