adding daniel's changes