modularized prototype 2 a bit