reworking code