changed stack and queue datatypes to interface with frontend