minor functions done