changes in pattern think it works need more tests