cleaned code and implemented type tel