fix uses before definitions