Implemented using javascript instead. It actually works