starts to port code to pool and branch specifics