abstract api logic with inheritance