Added johans new code