removed duplicated code from last commit