improved approach