-- this version is for easy code reuse