added casting function
renamed push/pop function