fixed my own code