Addding normalize function