This code lags to much for my tast