use prop and for/in loop