Added some easier to-understand definitions
added unitily functions