made code more clean