Wrote tests and adjusted methods