make getPosts proc more extensible