in progress - to do - logic for pe and build type