finally have a working model, does need to be cleaned up