added weight functionalities