added to teleport function