redid some code, didnt realise silex had convert