tweaks
improving complexity for zero case
adding a fat version for testing