another update a bit cleaned up version