modify module to use Flight class
compose module.exports to complete factory pattern