added spec files
added debug parameter
spec tests