first part of krun implementation