moving some codes here..