added method in server to get pattern