adjusted message size, removed unused code