tweaks for function