added log parsing, removed function and placed it inline; started assigning vars