complete basic implementation of API