added ability to do custom interval