added a little more code to the pojo approach