Function small modifications