added ismonsterstayingstill variable and logic