Updated implementation
added definitions
added working karma