added logging to models