create wager constructor and prototype. tidying up code still