starting work on best file selection code