second part implemented