partial implementation of teleport