hermes main function