applied changes from ticket #12