added all functions, but it’s broken