Use interval instead of delay
Fixes #1