implemented most features