improved compiler script