added get inline classes function & improved readability