fixed PID issue and added counter property