fixed the code a little