changed few functions