Added type decl and simplified some lines.
Added updateInBoard and pick.