added memset and memcpy; fixes #3 and #4