alternative way to populate struct