second draft of working version