Addressed #31 (needs testing)