added patch statistics, fixed initialisation problem