started to create functions for en-/decoding