finished the host functions, added log4j