Moved code to one function