fixing pattern to work right