Add cycling for multiple pegs, add 'submit' function