Adding object property function