Basic code for tool