added legacy python prototype for safe keeping