added if condition for stat hat