added int to pattern function