adding normalize function