Added and tested the two methods