separating out api component