Added data trimming