adding & fixing codes