updated methods and test