fixed up issue and removed logging