code direction problem