bug fix with usage function