refactor to object literal style