added methods for ordering, fix bug in BaseControl