Tried to make the code prettier