deleted. split functions to separate files