added max weight check