added support for alias accessors
refactored code