Add documentation, return boolean instead of int