made code more organized.