move logging to debug
reduce string operations for performance
beautify api