restructure and add testing, make create deptor pass