added reset() to $("#end").click(funtion {})