changed earlier posts to be refactored and using new API elements