registering resources a bit inconvinient, need to think of a better way to do it