prototype 1

crucial bugs fixed