start working on a function to calculate top posts