Although it is not perfect, this does work