copying in some code..