There should be a better way than this