some tweaks
removing redundant code