def run(args, modules=None):
    """This method is used for parsing commands"""
    if args[0] in globals():
        globals()[args[0]](args)
    else:
        try:
            cmd_parser = modules[args[0] + '.py']
            cmd_parser.run(args[1:])
        except KeyError:
            print('command not found')
