Moved code to the correct location