simplified the usage of the function