implemented #32 and #33