short program with arrays and string manipulations