jdrur version before implementing nimit's code