added packages and processes to gather info for logs
made logic less stupid