almost there! added reset functions by myself!