added functions to associate users to posts