cleaned code before merge