Added some extra credit functionality