implemented the missing functionality and wrote comments + README