add return types and fix setProperties