create weight variable