moved switch to given