first implementation of trim complete - needs further testing