don't forget to release locks!