Created function for normalizing object