added some helper functions
added stack data type; improved bitmap data type