code cleaned again