moved code from local code base