added maplib and a main