handling multiple build stages