externalized some variables