made code nicer