changed Post table and added method to Posts controller