script for statistics added