optimised but again the same problem