Deprecated duplicted code.