using ALog and DLog instead of NSlog