restored old functionality