implimented the 'net' for optimization (need to discuss)