more refining, initial version