Code for testing project Karl