Updated to use the structures