Add sample manipulation

Add sample manipulation.