initial code for trebuchet