more generalized way of adding properties and functions