made some functions strict and safe. removed default and key word args to force being explicit about args and simplify the code of the functions