added a util function and some more asset manager code