cleaned up prototype