fixing and reordering for consistency