added reset, bugged