Attempting to make this functional