monor additions .. still mostly psuedocode