Common function

Common function