removed 1024s from the code and replaced them with SAMPLES