Tried to make it faster 

Tried to make it faster 
but sage gives me error saying that 
unidentified names: