Updated to use numpy