Tried to make the darn thing smarter