better code structure