added orderby
changed detection gd version