formatting one function
extracting methods