improviments in the gitp function^