importing numpy only where needed.