merged with latest resource loader work