putting all the pieces together