basic patterns working along with some validation