fixed processing and added verbose output