made modules and changed function to return string