some suggestions by @charkost