fixed  methods logic + new tests