rewrote some methods