add prepare() for runtime optimization
separate data from logic