finshed writing methods with errors