slightly smarter :/