changed my code to run better