added spec to internal functions