finished add logging
refactor, change Instance variables to method