implement clear command, fixes #12