better organized code