added miles' changes