implemented modal directive. Hiding needs to be handled somehow differently.