adding messages, change API url logic