add function done

vertical horizontal diagonal yet to be done