fixed code to work with new dir structure, still need to work on the post module