The code is now working with poses