wrote the methods