moved guide code into a partial