tweaks and new code