added smarter returns