adding api communication