replace content from left or right