write save method and some failing tests