Added weight calculation