Initial python imlementation