updated for periodic 4 compat