Cleaning codes to search on and implemented checkStats method