Use reflection to get properties