few small changes to few functions