fixed the format function
added more examples