fixin issue number 239 by using proper ordering