made code simpler