shortened the code