moving inital render conditions to their own method