Draft 1 with tests working