a bit prettier and smarter