making vector calculation non-blocking (in progress; does not compile)