almost works, needs wait fixing