Removed unused weights() function