fixed extend
code cleanup, cutting anything unnecesary