bugs fixed, logs added