validation added. swap_position added.