moved API to its own directory