prototype code clean up