some tweaks and corrections