tried to simplify dependencies, but is still a mess