make all functions return bool, proper input/output params