added a test, got rid of dumb view functions