created service to handle posts data