made all functionality without UI