wrote all methods