added the abbility to create an object by clicking