Change method name from isvalid() to is_valid().
Change isfree() method name to is_free().