removed unused function, small tweaks