new patterns and hittest bug fixed