Adding new weight checking function