Python script

functionality for back end