first draft; should have all functionality