method added to get post