js didnt work so trying python