deleting unnecessary padding, fixing bug