weights are created at the end