adds compare
adds logging and removes logging
minor diff changes