improved working prototype