UPDATE: moved plotting dependencies to plotting functions