gsh as separate function