First version. Not working due to makaba problems