added direction and -Wall flag