fixed compress function to use correct names