Adding more free calls and moving after assertion in generate weights method