accessing properties from for in loop