Licenced under Apache licence, added new functions, changed construstor to array