defined functions for modifying samples at rx