Modified warp function