changed logging method to log4j