ported attribute mapping
redesigned project for swift