tweak the code a bit