added loadPost function