changing how build stages are rerieved to match the actual api