adds jorge's improvments