replaced :file with :path
use Class.new and cosmetic changes