Added new magic related code