this should be merged to core?