moved classes into patterns package