preparing codes