implemented surface switching