Started porting the program to numpy