with some tweaks